﻿@using Microsoft.Web.Helpers;
@{
  var showRecaptcha = true;
  if (IsPost) {
    if (ReCaptcha.Validate()) {
        @:Your response passed!
        showRecaptcha = false;
    }
    else{
      @:Your response didn't pass!
    }
  }
}
@model SimpleScrum.Models.LocalPasswordModel
@using (Html.BeginForm("Manage", "Accounts")) {
    @Html.AntiForgeryToken()
    <span class="text-error">@Html.ValidationSummary()</span>
        <fieldset>
            <legend>Change Password For Your Account</legend>
                <ol class="inline">
                    <li class="name">
                            @Html.LabelFor(m => m.OldPassword)
                                @Html.PasswordFor(m => m.OldPassword)
                    </li>
                    <li class="name">
                            @Html.LabelFor(m => m.NewPassword)
                            @Html.PasswordFor(m => m.NewPassword)
                    </li>
                    <li class="name">
                            @Html.LabelFor(m => m.ConfirmPassword)
                            @Html.PasswordFor(m => m.ConfirmPassword)
                    </li>
                    <li class="name">
                            @if (showRecaptcha == true)
                            {
                                if (ReCaptcha.PrivateKey != "")
                                {
                                    @ReCaptcha.GetHtml()
                                    <br /><input class="btn btn-danger" type="submit" value="Change password" />
                                }
                            }
                    </li>
                </ol>
        </fieldset>
}